<!--#include file="AspCms_SpecFun.asp" -->
<%CheckAdmin("AspCms_Spec.asp")%>
<!DOCTYPE html>
<html lang="zh-CN" style="min-height: 100%;">
<head>
<title>SpecAdd</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
<meta name="renderer" content="webkit">
<meta http-equiv="X-UA-Compatible" content="IE=edge,Chrome=1" />

<link href="https://cdn.bootcss.com/uikit/3.0.0-beta.22/css/uikit.min.css" rel="stylesheet">
<link href="https://cdn.bootcss.com/jquery.perfect-scrollbar/0.7.0/css/perfect-scrollbar.min.css" rel="stylesheet">
<link href="../../css/timoo/fancySelect.css" rel="stylesheet">
<link href="../../css/timoo/jquery.datetimepicker.min.css" rel="stylesheet">
<link href="../../css/timoo/timoo.css" rel="stylesheet">

<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="../../ueditor/ueditor.config.js"></script>
<script src="../../ueditor/ueditor.all.min.js"> </script>
<script src="../../ueditor/lang/zh-cn/zh-cn.js"></script>
<script src="https://cdn.bootcss.com/uikit/3.0.0-beta.22/js/uikit.min.js"></script>
<script src="https://cdn.bootcss.com/uikit/3.0.0-beta.22/js/uikit-icons.min.js"></script>
<script src="https://cdn.bootcss.com/jquery.perfect-scrollbar/0.7.0/js/perfect-scrollbar.jquery.min.js"></script>
<script src="../../js/timoo/icheck.min.js"></script>
<script src="../../js/timoo/fancySelect.js"></script>
<script src="../../js/timoo/jquery.datetimepicker.full.min.js"></script>
<script src="../../js/timoo/timoo.js"></script>
</head>
<body>
<div class="tm-right">
    <div class="main">
        <div class="section setting-company">
            <div class="layout">
                <div class="title">添加参数</div>
                <div class="content">
                    <form action="?action=add" method="post" name="frmSpec">
                        <input type="hidden" name="SpecDiversification" value="<%=SpecDiversification%>">
						<input type="hidden" name="SpecID" value="<%=SpecID%>">
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">参数名称</span>
                            </div>
                            <div class="input">
                                <input type="text" maxLength="200" name="SpecName" value="<%=SpecName%>">
                            </div>
                        </div>
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">字段名称</span>
                            </div>
                            <div class="input">
                                <input type="text" maxLength="200" name="SpecField" value="<%=SpecField%>">
                            </div>
                        </div>
                        <div class="tm-transition checkbox list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">是否必须填写</span>
                            </div>
                            <div class="uk-clearfix input">
                                <label for="Form-Not-Null" class="uk-clearfix uk-float-left tm-transition">
                                    <span class="uk-float-left check">
                                        <i class="tm-transition icon" uk-icon="icon: check"></i>
                                    </span>
                                    <span class="uk-float-left">启用</span>
                                    <input id="Form-Not-Null" type="checkbox" name="SpecNotNull" <%if SpecNotNull then%>checked<%end if%>>
                                </label>
                            </div>
                        </div>
                        <div id="Type" class="tm-transition radio table-select list hide">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">控件类型</span>
                            </div>
                            <div class="uk-clearfix input">
                                <li class="uk-clearfix uk-float-left input-select transverse-select">
                                    <select class="tm-select" name="SpecControlType">
                                        <option value="0" selected>文本</option>
										<option value="1">数字</option>
										<option value="2">编辑器</option>
										<option value="3">附件</option>
										<option value="4">日期</option>
										<option value="5">颜色</option>
										<option value="6">单选</option>
										<option value="7">多选</option>
                                    </select>
                                    <script>
                                        for(var i=0;i<frmSpec.SpecControlType.options.length;i++){
											
											if(frmSpec.SpecControlType.options[i].value == "<%=SpecControlType%>")
												frmSpec.SpecControlType.selectedIndex = i;

										}
                                    </script>
                                </li>
                            </div>
                        </div>
						<div class="tm-transition radio table-select list hide">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">所属类型</span>
                            </div>
                            <div class="uk-clearfix input">
                                <li class="uk-clearfix uk-float-left input-select transverse-select">
                                    <select class="tm-select" name="SpecCategory" onChange="changeSpecCategoryType(this)">
                                        <option value="P" selected>产品</option>
										<option value="S">单篇</option>
										<option value="C">文章</option>
										<option value="DL">下载</option>
										<option value="HR">招聘</option>
										<option value="FO">相册</option>
										<option value="VI">视频</option>
                                    </select>
                                    <script>
                                        for(var i=0;i<frmSpec.SpecCategory.options.length;i++){

											if(frmSpec.SpecCategory.options[i].value == "<%=SpecCategory%>")
												frmSpec.SpecCategory.selectedIndex = i;
												
										}
                                    </script>
                                </li>
                            </div>
                        </div>
                        <div class="tm-transition textarea list option-select tm-display-none">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">选项内容</span>
                                <i class="tm-transition icon" uk-icon="icon: info" uk-tooltip="pos: right" title="多条选项请用“|”隔开。"></i>
                            </div>
                            <div class="input">
                                <textarea type="text" name="SpecOptions"><%=SpecOptions%></textarea>
                            </div>
                        </div>
                        <div class="tm-transition list">
                            <div class="uk-clearfix tm-transition subject">
                                <span class="uk-float-left">排序</span>
                            </div>
                            <div class="input">
                                <input type="text" maxlength="9" value="0" name="SpecOrder">
                            </div>
                        </div>
                        <div class="uk-clearfix tm-transition list submit">
                            <div class="uk-float-left input">
                                <input type="submit" value="添加">
                            </div>
                            <div class="uk-float-left input">
                                <input type="button" value="返回" onClick="history.go(-1)"> 
                            </div>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>
</div>
<script>
function tm_type_select(){
        
    var Type = jQuery('#Type');
    
    Type.on('DOMNodeInserted', '.trigger', function(){
        
        //获取选中的控件类型
        var Text = jQuery(this).text();
        
        //判断控件类型
        if( Text === '单选' || Text === '多选' ){
            
            jQuery('.option-select').removeClass('tm-display-none');
            
        } else {
            
            jQuery('.option-select').addClass('tm-display-none');

        }
        
    })
        
}
    
tm_type_select();
</script>
</body>
</html>